package fr.mystnihon.game.engine;

import fr.mystnihon.game.model.actor.Personnage;
import fr.mystnihon.game.model.item.Weapon;

public class DamageCalculator {

	private DamageCalculator() {

	}

	public static double calculatePhysicalDamage(Personnage target,
			Personnage attacker) {
		double damage = target.getStrenght() * 0.13
				* Math.pow((target.getLevel() + 1), (1 / 2));
		Weapon w;
		System.out.println("Dommage fait : " + damage);
		if ((w = attacker.getWeapon()) != null) {
			damage += w.getDamage();
		}
		return damage;
	}

	public static double calculateMagickalDamage(Personnage target,
			Personnage attacker) {
		return 0;
	}

}
